package com.pmy.dao;

import com.pmy.pojo.Bill;
import com.pmy.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface BillMapper {
    //    根据商品名称、供应商、是否付款查询
    List<Bill> queryAll(Map<String,Object> map);

    //   根据条件查询订单总数
    int getBillCount(Map<String,Object> map);

    //    根据id查询一条数据
    @Select("select * from `smbms`.`smbms_bill` WHERE `id` = #{id}")
    Bill getBillById(int id);

    //    添加一条数据
    int addBill(Map<String, Object> map);

    //    删除一条数据
    @Delete("DELETE FROM `smbms`.`smbms_bill` WHERE `id` = #{id}")
    int deleteBillById(int id);

    //    修改一条数据
    int updateBillById(Map<String,Object> map);
}
